<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div>当前页面上的cookie</div>
    <code>
      <pre>
        const cookies = await cookieStore.getAll()
        const cookie = cookieStore.get()
        await cookieStore.delete();
        await cookieStore.set();
      </pre>
    </code>
    <div id="container"></div>
    <script>
      cookieStore.getAll().then((cookies) => {
        const cookieStr = cookies
          .map((cookie, index) => {
            return `<li>${cookie.name}：<span>${cookie.value}</span></li>`;
          })
          .join('');
        document.querySelector(
          '#container'
        ).innerHTML = `<ol>${cookieStr}</ol>`;
      });
    </script>
  </body>
</html>
